
/**
 * 报告修改页面js  重新生成报告单
 * @author singwa
 */

function ReportRet(ybid) {

    // 获取登录页面中的用户名 和 密码
    /*var ybid = $('input[name="ybid"]').val();*/
    /* var password = $('input[name="password"]').val();*/
    /*layer.alert('ddd');*/
    /*        if(!username) {
                return dialog.error('用户名不能为空');

            }
            if(!password) {
                return dialog.error('密码不能为空');
            }*/
    /* return dialog.success('成功', '/index.php/index/index/index');*/

    var url = "/index.php/index/report/ReportRet";
    var data = {'ybid':ybid};
    // 执行异步请求  $.post
    $.post(url,data,function(result){
        if(result.status == 0) {
            return dialog.error(result.message);
        }
        if(result.status == 1) {

            return  dialog.full(result.message);
        }

    },'JSON');
}
//常规信息编辑
window.ModifyReportByYbid=function(ybid){
    location.href = '/index.php/index/report/EditReportYbid?ybid='+ybid;
}

//tct 信息编辑
window.ModifyBlReportByYbid=function(ybid){
    location.href = '/index.php/index/report/EditBlReportYbid?ybid='+ybid;
}

//bl 信息编辑
window.ModifyTctReportByYbid=function(ybid){
    location.href = '/index.php/index/report/EditTctReportYbid?ybid='+ybid;
}
function ModifyTctReportByYbid(ybid) {
    location.href = '/index.php/index/report/EditTctReportYbid?ybid='+ybid;
}


//结果编辑
function ModifyReportxmcdz(yqdh, cdrq, ybbh) {
    var url = "/index.php/index/report/EditReportXmcdz";
    var data = {'yqdh':yqdh,'ybbh':ybbh,'cdrq':cdrq};
    location.href = '/index.php/index/report/EditReportXmcdz?yqdh='+yqdh+'&cdrq='+cdrq+'&ybbh='+ybbh;
}

//bl编辑
function ModifyBlReportxmcdz(ybid) {
    var url = "/index.php/index/report/EditBlReportXmcdz";
    var data = {'ybid':ybid};
    location.href = '/index.php/index/report/EditBlReportXmcdz?yqdh='+yqdh+'&cdrq='+cdrq+'&ybbh='+ybbh;
}


//tct编辑
function ModifyTctReportxmcdz(ybid) {
    var url = "/index.php/index/report/EditTctReportXmcdz";
    var data = {'ybid':ybid};
    location.href = '/index.php/index/report/EditTctReportXmcdz?yqdh='+yqdh+'&cdrq='+cdrq+'&ybbh='+ybbh;
}



    // 执行异步请求  $.post
  /*  $.post(url,data,function(result){
        if(result.status == 0) {
            return dialog.error(result.message);
        }
        if(result.status == 1) {
            return dialog.full(result.message);
            //请求成功
            var urledit = "";
            window.location.href=urledit;
        }

    },'JSON');*/

//根据yqdh,xmcdz, ybbh ,xmdh  修改结果值
function UpdateXmcdzByYxyx(yqdh,cdrq,ybbh,xmdh,xmcdz) {
    var url = "/index.php/index/report/UpdateXmcdzByYxyx";
    var data = {'yqdh':yqdh,'cdrq':cdrq,'ybbh':ybbh,'xmdh':xmdh,'xmcdz':xmcdz};

    // 执行异步请求  $.post
    $.post(url,data,function(result){
        if(result.status == 0) {
            return dialog.error(result.message);
        }
        if(result.status == 1) {

            return  dialog.full(result.message);
        }

    },'JSON');
}



function DelXmcdzByYxyx(yqdh,cdrq,ybbh,xmdh) {

    var url = "/index.php/index/report/DelXmcdzByYxyx";
    var data = {'yqdh':yqdh,'cdrq':cdrq,'ybbh':ybbh,'xmdh':xmdh};


    // 执行异步请求  $.post
     $.post(url,data,function(result){
         if(result.status == 0) {
             return dialog.error(result.message);
         }
         if(result.status == 1) {
             /* return dialog.success(result.message, '/index.php/index/index/index');*/

             return  dialog.full(result.message);
         }

     },'JSON');
}